#include <stdio.h>

int main()
{
    float original_price, actual_price;
    scanf("%f", &original_price);
    if (original_price <= 50) {
        actual_price = original_price;
    } else if (original_price <= 150) {
        actual_price = original_price * 0.9;
    } else {
        actual_price = original_price * 0.8;
    }
    printf("%.2f", actual_price);
    return 0;
}
